import request from '@/utils/request'

// 获取禁用月份
export function getMonth(id) {
  return request({
    url: '/warning/configuration/getMonth/' + id,
    method: 'get'
  })
}

// 查询告警规则管理
export function pageUration(query) {
  return request({
    url: '/warning/configuration/page',
    method: 'get',
    params: query
  })
}

// 查询告警规则详细
export function getUration(id) {
  return request({
    url: '/warning/configuration/details/' + id,
    method: 'get'
  })
}

// 新增告警规则
export function addUration(data) {
  return request({
    url: '/warning/configuration/save',
    method: 'post',
    data: data
  })
}

// 修改告警规则
export function updateUration(data) {
  return request({
    url: '/warning/configuration/update',
    method: 'put',
    data: data
  })
}

// 删除告警规则
export function delUration(data) {
  return request({
    url: '/warning/configuration/delete',
    method: 'post',
    data: Array.isArray(data)?data:[data]
  })
}
